3.914 \(\int (A+B x) \sqrt{a+b x+c x^2} \, dx\)

Optimal. Leaf size=113 \[ \frac{\left (b^2-4 a c\right ) (b B-2 A c) \tanh ^{-1}\left (\frac{b+2 c x}{2 \sqrt{c} \sqrt{a+b x+c x^2}}\right )}{16 c^{5/2}}-\frac{(b+2 c x) \sqrt{a+b x+c x^2} (b B-2 A c)}{8 c^2}+\frac{B \left (a+b x+c x^2\right )^{3/2}}{3 c} \]

[Out]

-((b*B - 2*A*c)*(b + 2*c*x)*Sqrt[a + b*x + c*x^2])/(8*c^2) + (B*(a + b*x + c*x^2
)^(3/2))/(3*c) + ((b^2 - 4*a*c)*(b*B - 2*A*c)*ArcTanh[(b + 2*c*x)/(2*Sqrt[c]*Sqr
t[a + b*x + c*x^2])])/(16*c^(5/2))

_______________________________________________________________________________________

Rubi [A]  time = 0.109821, antiderivative size = 113, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2 \[ \frac{\left (b^2-4 a c\right ) (b B-2 A c) \tanh ^{-1}\left (\frac{b+2 c x}{2 \sqrt{c} \sqrt{a+b x+c x^2}}\right )}{16 c^{5/2}}-\frac{(b+2 c x) \sqrt{a+b x+c x^2} (b B-2 A c)}{8 c^2}+\frac{B \left (a+b x+c x^2\right )^{3/2}}{3 c} \]

Antiderivative was successfully verified.

[In]  Int[(A + B*x)*Sqrt[a + b*x + c*x^2],x]

[Out]

-((b*B - 2*A*c)*(b + 2*c*x)*Sqrt[a + b*x + c*x^2])/(8*c^2) + (B*(a + b*x + c*x^2
)^(3/2))/(3*c) + ((b^2 - 4*a*c)*(b*B - 2*A*c)*ArcTanh[(b + 2*c*x)/(2*Sqrt[c]*Sqr
t[a + b*x + c*x^2])])/(16*c^(5/2))

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 12.5805, size = 104, normalized size = 0.92 \[ \frac{B \left (a + b x + c x^{2}\right )^{\frac{3}{2}}}{3 c} + \frac{\left (b + 2 c x\right ) \left (2 A c - B b\right ) \sqrt{a + b x + c x^{2}}}{8 c^{2}} - \frac{\left (2 A c - B b\right ) \left (- 4 a c + b^{2}\right ) \operatorname{atanh}{\left (\frac{b + 2 c x}{2 \sqrt{c} \sqrt{a + b x + c x^{2}}} \right )}}{16 c^{\frac{5}{2}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((B*x+A)*(c*x**2+b*x+a)**(1/2),x)

[Out]

B*(a + b*x + c*x**2)**(3/2)/(3*c) + (b + 2*c*x)*(2*A*c - B*b)*sqrt(a + b*x + c*x
**2)/(8*c**2) - (2*A*c - B*b)*(-4*a*c + b**2)*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(
a + b*x + c*x**2)))/(16*c**(5/2))

_______________________________________________________________________________________

Mathematica [A]  time = 0.202076, size = 112, normalized size = 0.99 \[ \frac{2 \sqrt{c} \sqrt{a+x (b+c x)} \left (4 c (2 a B+c x (3 A+2 B x))+2 b c (3 A+B x)-3 b^2 B\right )+3 \left (b^2-4 a c\right ) (b B-2 A c) \log \left (2 \sqrt{c} \sqrt{a+x (b+c x)}+b+2 c x\right )}{48 c^{5/2}} \]

Antiderivative was successfully verified.

[In]  Integrate[(A + B*x)*Sqrt[a + b*x + c*x^2],x]

[Out]

(2*Sqrt[c]*Sqrt[a + x*(b + c*x)]*(-3*b^2*B + 2*b*c*(3*A + B*x) + 4*c*(2*a*B + c*
x*(3*A + 2*B*x))) + 3*(b^2 - 4*a*c)*(b*B - 2*A*c)*Log[b + 2*c*x + 2*Sqrt[c]*Sqrt
[a + x*(b + c*x)]])/(48*c^(5/2))

_______________________________________________________________________________________

Maple [B]  time = 0.009, size = 229, normalized size = 2. \[{\frac{Ax}{2}\sqrt{c{x}^{2}+bx+a}}+{\frac{Ab}{4\,c}\sqrt{c{x}^{2}+bx+a}}+{\frac{aA}{2}\ln \left ({1 \left ({\frac{b}{2}}+cx \right ){\frac{1}{\sqrt{c}}}}+\sqrt{c{x}^{2}+bx+a} \right ){\frac{1}{\sqrt{c}}}}-{\frac{{b}^{2}A}{8}\ln \left ({1 \left ({\frac{b}{2}}+cx \right ){\frac{1}{\sqrt{c}}}}+\sqrt{c{x}^{2}+bx+a} \right ){c}^{-{\frac{3}{2}}}}+{\frac{B}{3\,c} \left ( c{x}^{2}+bx+a \right ) ^{{\frac{3}{2}}}}-{\frac{xBb}{4\,c}\sqrt{c{x}^{2}+bx+a}}-{\frac{{b}^{2}B}{8\,{c}^{2}}\sqrt{c{x}^{2}+bx+a}}-{\frac{abB}{4}\ln \left ({1 \left ({\frac{b}{2}}+cx \right ){\frac{1}{\sqrt{c}}}}+\sqrt{c{x}^{2}+bx+a} \right ){c}^{-{\frac{3}{2}}}}+{\frac{B{b}^{3}}{16}\ln \left ({1 \left ({\frac{b}{2}}+cx \right ){\frac{1}{\sqrt{c}}}}+\sqrt{c{x}^{2}+bx+a} \right ){c}^{-{\frac{5}{2}}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((B*x+A)*(c*x^2+b*x+a)^(1/2),x)

[Out]

1/2*A*x*(c*x^2+b*x+a)^(1/2)+1/4*A/c*(c*x^2+b*x+a)^(1/2)*b+1/2*A/c^(1/2)*ln((1/2*
b+c*x)/c^(1/2)+(c*x^2+b*x+a)^(1/2))*a-1/8*A/c^(3/2)*ln((1/2*b+c*x)/c^(1/2)+(c*x^
2+b*x+a)^(1/2))*b^2+1/3*B*(c*x^2+b*x+a)^(3/2)/c-1/4*B*b/c*(c*x^2+b*x+a)^(1/2)*x-
1/8*B*b^2/c^2*(c*x^2+b*x+a)^(1/2)-1/4*B*b/c^(3/2)*ln((1/2*b+c*x)/c^(1/2)+(c*x^2+
b*x+a)^(1/2))*a+1/16*B*b^3/c^(5/2)*ln((1/2*b+c*x)/c^(1/2)+(c*x^2+b*x+a)^(1/2))

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(sqrt(c*x^2 + b*x + a)*(B*x + A),x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 0.30326, size = 1, normalized size = 0.01 \[ \left [\frac{4 \,{\left (8 \, B c^{2} x^{2} - 3 \, B b^{2} + 2 \,{\left (4 \, B a + 3 \, A b\right )} c + 2 \,{\left (B b c + 6 \, A c^{2}\right )} x\right )} \sqrt{c x^{2} + b x + a} \sqrt{c} + 3 \,{\left (B b^{3} + 8 \, A a c^{2} - 2 \,{\left (2 \, B a b + A b^{2}\right )} c\right )} \log \left (-4 \,{\left (2 \, c^{2} x + b c\right )} \sqrt{c x^{2} + b x + a} -{\left (8 \, c^{2} x^{2} + 8 \, b c x + b^{2} + 4 \, a c\right )} \sqrt{c}\right )}{96 \, c^{\frac{5}{2}}}, \frac{2 \,{\left (8 \, B c^{2} x^{2} - 3 \, B b^{2} + 2 \,{\left (4 \, B a + 3 \, A b\right )} c + 2 \,{\left (B b c + 6 \, A c^{2}\right )} x\right )} \sqrt{c x^{2} + b x + a} \sqrt{-c} + 3 \,{\left (B b^{3} + 8 \, A a c^{2} - 2 \,{\left (2 \, B a b + A b^{2}\right )} c\right )} \arctan \left (\frac{{\left (2 \, c x + b\right )} \sqrt{-c}}{2 \, \sqrt{c x^{2} + b x + a} c}\right )}{48 \, \sqrt{-c} c^{2}}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(sqrt(c*x^2 + b*x + a)*(B*x + A),x, algorithm="fricas")

[Out]

[1/96*(4*(8*B*c^2*x^2 - 3*B*b^2 + 2*(4*B*a + 3*A*b)*c + 2*(B*b*c + 6*A*c^2)*x)*s
qrt(c*x^2 + b*x + a)*sqrt(c) + 3*(B*b^3 + 8*A*a*c^2 - 2*(2*B*a*b + A*b^2)*c)*log
(-4*(2*c^2*x + b*c)*sqrt(c*x^2 + b*x + a) - (8*c^2*x^2 + 8*b*c*x + b^2 + 4*a*c)*
sqrt(c)))/c^(5/2), 1/48*(2*(8*B*c^2*x^2 - 3*B*b^2 + 2*(4*B*a + 3*A*b)*c + 2*(B*b
*c + 6*A*c^2)*x)*sqrt(c*x^2 + b*x + a)*sqrt(-c) + 3*(B*b^3 + 8*A*a*c^2 - 2*(2*B*
a*b + A*b^2)*c)*arctan(1/2*(2*c*x + b)*sqrt(-c)/(sqrt(c*x^2 + b*x + a)*c)))/(sqr
t(-c)*c^2)]

_______________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \[ \int \left (A + B x\right ) \sqrt{a + b x + c x^{2}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x+A)*(c*x**2+b*x+a)**(1/2),x)

[Out]

Integral((A + B*x)*sqrt(a + b*x + c*x**2), x)

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.282113, size = 166, normalized size = 1.47 \[ \frac{1}{24} \, \sqrt{c x^{2} + b x + a}{\left (2 \,{\left (4 \, B x + \frac{B b c + 6 \, A c^{2}}{c^{2}}\right )} x - \frac{3 \, B b^{2} - 8 \, B a c - 6 \, A b c}{c^{2}}\right )} - \frac{{\left (B b^{3} - 4 \, B a b c - 2 \, A b^{2} c + 8 \, A a c^{2}\right )}{\rm ln}\left ({\left | -2 \,{\left (\sqrt{c} x - \sqrt{c x^{2} + b x + a}\right )} \sqrt{c} - b \right |}\right )}{16 \, c^{\frac{5}{2}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(sqrt(c*x^2 + b*x + a)*(B*x + A),x, algorithm="giac")

[Out]

1/24*sqrt(c*x^2 + b*x + a)*(2*(4*B*x + (B*b*c + 6*A*c^2)/c^2)*x - (3*B*b^2 - 8*B
*a*c - 6*A*b*c)/c^2) - 1/16*(B*b^3 - 4*B*a*b*c - 2*A*b^2*c + 8*A*a*c^2)*ln(abs(-
2*(sqrt(c)*x - sqrt(c*x^2 + b*x + a))*sqrt(c) - b))/c^(5/2)